import {post_json, get} from '../utils/request'


/**
 * 美食列表
 * @param params
 * @returns {*}
 */
export function food_list(params) {
    return post_json('admin/food/page', params)
}


/**
 * 添加
 * @param params
 * @returns {*|Promise|Promise<any>|Promise|Promise|Promise}
 */
export function add(params) {
    return post_json('admin/food/add', params)
}


/**s
 *删除
 * @param params
 * @returns {*|Promise|Promise<any>|Promise|Promise|Promise}
 */
export function delete_row(params) {
    return get('admin/food/delete', params)
}

/**
 * 详情
 * @param params
 * @returns {Promise<unknown>}
 */
export function food_detail(params) {
    return get('admin/food/detail', params)
}

/**
 * 更新
 * @param params
 * @returns {Promise<unknown>}
 */
export function food_update(params) {
    return post_json('admin/food/update', params)
}


export function food_update_status(params) {
    return post_json('admin/food/updateStatus', params)
}

export function food_update_status_down(params) {
    return post_json('admin/food/updateStatusDown', params)
}

